<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="人员信息" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addPerson()"
                        ng-disabled="!btnPermission.personSave"
                        title="{{!btnPermission.personSave?'无权限执行此操作':''}}">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" ng-model="condition.cnameLike" class="form-control txt-search"
                            placeholder="姓名">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true"
                set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                    ng-class="{'row-selected': $index === markInfo.curRow}">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div ng-switch="itemCol.type">
                                            <div ng-switch-when="operate">
                                                <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="editPerson(item)" ng-disabled="!btnPermission.personSave"
                                                    title="{{!btnPermission.personSave?'无权限执行此操作':''}}">编辑</button>
                                                <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="delPerson(item)" ng-disabled="!btnPermission.personDel"
                                                    title="{{!btnPermission.personDel?'无权限执行此操作':''}}">删除</button>
                                            </div>
                                            <div ng-switch-default>
                                                <span>{{item[itemCol.dataField]}}</span>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                    ng-class="{'row-selected': $index === markInfo.curRow}">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div ng-switch="itemCol.type">
                                            <div ng-switch-when="click">
                                                <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
                                                    {{item[itemCol.dataField]}}
                                                </a>
                                            </div>
                                            <div ng-switch-default class="spill-dots">
                                                <span>{{item[itemCol.dataField]}}</span>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="新增" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area d-t-35 d-b-60">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>姓名：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.cname" name="cname" class="form-control" required
                                maxlength="12">
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.cname.$dirty || (form.cname.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.cname.$error.required && !form.cname.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>联系方式：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.contactTel" name="contactTel" class="form-control"
                                maxlength="11" yb-contact yb-focus required>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.contactTel.$dirty || (form.contactTel.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.contactTel.$error.required && !form.contactTel.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                            <div class="error-msg"
                                ng-show="form.contactTel.$error.contactInfo && !form.contactTel.focused">
                                <i class="yb-icon ico-times-circular"></i>请输入正确的联系方式
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>联系地址：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.address" name="contactAddress" class="form-control" required
                                maxlength="100">
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.contactAddress.$dirty || (form.contactAddress.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.contactAddress.$error.required && !form.contactAddress.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>身份证号：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.idNumber" name="idNumber" class="form-control"
                                maxlength="18" required>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.idNumber.$dirty || (form.idNumber.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.idNumber.$error.required && !form.idNumber.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>岗位：</label>
                        <div class="col-xs-5 wrapper-none">
                            <select ng-model="detailInfo.jobId" name="jobId" class="form-control"
                                ng-options="item.id as item.name for item in jobList" required>
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.jobId.$dirty || (form.jobId.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.jobId.$error.required && !form.jobId.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group m-b-xs">
                        <label class="col-xs-2 control-label"><i>*</i>性别：</label>
                        <label class="col-xs-5 control-label">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.gender" value="1"
                                yb-radio-name="男">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.gender" value="0"
                                yb-radio-name="女">
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>入职时间：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="hiredate" class="form-control date-picker"
                                ng-model="detailInfo.hiredate" datepicker-popup="{{'yyyy-MM-dd'}}"
                                ng-click="showDate = !showDate" is-open="showDate" close-text="关闭" modal-size="small"
                                readonly required>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.hiredate.$dirty || (form.hiredate.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.hiredate.$error.required && !form.hiredate.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group m-b-xs">
                        <label class="col-xs-2 control-label"><i>*</i>是否兼职：</label>
                        <label class="col-xs-5 control-label">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.partTimeJob"
                                value="0" yb-radio-name="否" yb-click="detailInfo.secJob = '';">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.partTimeJob"
                                value="1" yb-radio-name="是">
                        </label>
                    </div>
                    <div class="form-group" ng-if="detailInfo.partTimeJob=='1'">
                        <label class="col-xs-2 control-label"><i>*</i>第二岗位：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.secJob" name="secJob" class="form-control" required
                                maxlength="10">
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.secJob.$dirty || (form.secJob.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.secJob.$error.required && !form.secJob.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group save-bar m-t-md">
                        <label class="col-xs-2 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)"
                                ng-disabled="!btnPermission.personSave"
                                title="{{!btnPermission.personSave?'无权限执行此操作':''}}">保存</button>
                            <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div tab heading="修改" active="activeFlag[2]" ng-if="activeFlag[2]">
            <div class="main-area d-t-35 d-b-60">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">姓名：</label>
                        <div class="col-xs-5 control-label" style="text-align: left;">{{detailInfo.cname||'-'}}</div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">身份证号：</label>
                        <div class="col-xs-5 control-label" style="text-align: left;">{{detailInfo.idNumber||'-'}}</div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">性别：</label>
                        <div class="col-xs-5 control-label" style="text-align: left;">{{detailInfo.genderF||'-'}}</div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">入职时间：</label>
                        <div class="col-xs-5 control-label" style="text-align: left;">{{detailInfo.hiredateF||'-'}}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>联系方式：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.contactTel" name="contactTel" class="form-control"
                                maxlength="11" yb-contact yb-focus required>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.contactTel.$dirty || (form.contactTel.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.contactTel.$error.required && !form.contactTel.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                            <div class="error-msg"
                                ng-show="form.contactTel.$error.contactInfo && !form.contactTel.focused">
                                <i class="yb-icon ico-times-circular"></i>请输入正确的联系方式
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>联系地址：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.address" name="contactAddress" class="form-control" required
                                maxlength="100">
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.contactAddress.$dirty || (form.contactAddress.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.contactAddress.$error.required && !form.contactAddress.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i>岗位：</label>
                        <div class="col-xs-5 wrapper-none">
                            <select ng-model="detailInfo.jobId" name="jobId" class="form-control"
                                ng-options="item.id as item.name for item in jobList" required>
                                <option value="">请选择</option>
                            </select>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.jobId.$dirty || (form.jobId.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.jobId.$error.required && !form.jobId.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group m-b-xs">
                        <label class="col-xs-2 control-label"><i>*</i>是否兼职：</label>
                        <label class="col-xs-5 control-label">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.partTimeJob"
                                value="0" yb-radio-name="否" yb-click="detailInfo.secJob = '';">
                            <input type="radio" class="m-r-md pull-left" yb-radio ng-model="detailInfo.partTimeJob"
                                value="1" yb-radio-name="是">
                        </label>
                    </div>
                    <div class="form-group" ng-if="detailInfo.partTimeJob=='1'">
                        <label class="col-xs-2 control-label"><i>*</i>第二岗位：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.secJob" name="secJob" class="form-control" required
                                maxlength="10">
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.secJob.$dirty || (form.secJob.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.secJob.$error.required && !form.secJob.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group save-bar m-t-md">
                        <label class="col-xs-2 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)"
                                ng-disabled="!btnPermission.personSave"
                                title="{{!btnPermission.personSave?'无权限执行此操作':''}}">保存</button>
                            <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>